<template>
	<view class="mySpecies u-skeleton">
		<u-navbar title="我的金币" :background="{
			'backgroundColor':'#fff'
		}" :borderBottom="false" class="u-skeleton-rect">
			<view class="nav-right" slot = "right" @click="$util.redirectTo('/pages/my/mySpeciesList')">{{$store.state.jb}}记录</view>
		</u-navbar>
		<view class="top-image rect">
			<u-image width="100rpx" height="100rpx" :src="$util.img('/static/img/card/金币.png')"></u-image>
		</view>
		<view class="tips rect">{{$store.state.jb}}数量</view>
		<view class="num rect">{{info.giveaway}}</view>
		<u-skeleton :loading="loding" :animation="true" bgColor="#FFF"></u-skeleton>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				loding: true, //初始化骨架屏展示
				info:{}
			}
		},
		onShow() {
			this.getinfo();
		},
		methods: {
			//获取用户自己的信息
			getinfo() {
				this.$http.asyncSendrequest({
					url: '/profile/userInfo',
					success: res => {
						if(res.code == '0') {
							this.info = res.data;
							this.loding = false //初始化骨架屏展示
						}
					}
				})
			}

		}
	}
</script>

<style lang="scss" scoped>
	.mySpecies{
		width: 100%;
		min-height: 100vh;
		background: #fff;
		padding-top: 100rpx;
		.top-image{
			display: flex;
			justify-content: center;
		}
		.tips{
			margin-top: 40rpx;
			text-align: center;
			font-size: 28rpx;
			color: rgba(0,0,0,.4);
		}
		.num{
			font-size: 64rpx;
			font-weight: bold;
			text-align: center;
			margin-top: 60rpx;
		}
	}
	.nav-right{
		margin-right: 30rpx;
	}
</style>